<%--
 *  File:    PharmacyEdit.jsp
 *  @Author: Jackyin
 *  Date:    2011/1/13 
 *
 *  Copyright (C) 2000 - 2010 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
<%
  //init param
  Category cat = Category.getInstance("jsp.PharmacyEdit");
  String strModuleName = "ERM";
  String privilegeCode = "10330,10903";
  String contextPath = request.getContextPath();
%>
<% //--------------------  include files list --%>
<%@ include file="/inc/CommonHeader.inc" %>
<%@ include file="/inc/NewCalendar.inc"  %>
<%@ page contentType = "text/html;charset=UTF-8" %>

<html>
<head>
<title>PharmacyEdit</title>
<PageFlow:CheckPageFlow pageName="p_pharmacydetail"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=contextPath%>/js/SummaryDivision.js"></script>
 <script language="JavaScript" src="<%=contextPath %>/js/Calendar.js"></script> 

<%
String IsEdit="";
if(request.getParameter("pharmacyid")!=null)
{
  IsEdit="edit";
}
String dateFormat = (String)session.getAttribute("dateformat");
if(dateFormat==null)
	dateFormat = "yyyy-MM-dd";
%>
<script language="JavaScript">
function page_save()
{
	//alert(document.getElementsByTagName("html")[0].innerHTML);
	  if(!checkForm(document.cform))
	    return;
  
	  //  判断邮编
	  var zipcode=document.cform.zipcode.value;
	  if(zipcode!=""){
	  if(zipcode.length!=6){
	   alert("请输入六位数字的邮编");
	    return;
	      }
	  }
	
		//
	  document.cform.target = "_self";
	  if(document.cform.pharmacyid.value==null || document.cform.pharmacyid.value==""){
		  document.cform.actionname.value="add";
	   }
	  else{
		  document.cform.actionname.value="modify";
	  }
	if(cform.shortname.value=="")
  	  cform.shortname.value = cform.pharmacyname.value;
  	  emptyToNull(document.cform);
	 __submitData('pharmacy_cform',true);
	<%if(!(IsEdit).equals("edit")){%>					
		setTimeout("__clickedTab(document.getElementById('attributeTab'),'/oval/zyl/masterdata/erm/ZylMasterdataRelationship.jsp?globalpccode=114');","800");
	<%} %>
       
 }
var popwindow;

function page_setRegion(code,name)
{
  if(code != document.cform.regioncode.value)
  {
    document.cform.citycode.value = " ";
    document.cform.cityname.value = " ";
  }
  document.cform.regioncode.value = code;
  document.cform.regionname.value = name;
  if (popwindow != null)
    popwindow.close();
}

function page_selectProvince()
{
  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open('<%=contextPath %>/masterdata/ogm/RegionSelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN','newwindow', 'height=250, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
}

function page_selectCity(flag,grade)
{
  var regioncode = document.cform.regioncode.value;
  var parentcitycode = document.cform.citycode.value;
  if(flag=="city")parentcitycode='null';
  if(regioncode=="" || regioncode==-1){
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_Province"))%>");
    return;
  }
  if(parentcitycode==" " || parentcitycode==-1){
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_City"))%>");
    return;
  }
  var url='<%=contextPath %>/masterdata/ogm/CitySelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN&regioncode=' + regioncode + '&flag=' + flag+'&grade='+grade;
  if(flag=="county"){
   url=url+'&parentcitycode='+parentcitycode;
  }
  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open(url,'newwindow', 'height=250, width=400,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}


function page_setCity(code,name,id,flag)
{
	if(flag == "county"){
		document.cform.countycode.value = code;
		document.cform.countyname.value = name;
	}else {
		document.cform.citycode.value = code;
		document.cform.cityname.value = name;
		document.cform.countycode.value = " ";
    	document.cform.countyname.value = " ";
	}
  if (popwindow != null)
    popwindow.close();
}


function page_setOrg(id,name,code)
{
  document.cform.parentorgid.value = id;
  document.cform.parentorgcode.value = code;  
  document.cform.parentorgname.value = name;
  var remote = window.open("","newwindow");
  if (remote != null)
    remote.close();

  if(document.cform.parentorgcode.value == document.cform.orgcode.value){
    document.cform.franchiseno.disabled = false;
    document.cform.totalpharmacy.disabled = false;
  }else{
    document.cform.franchiseno.disabled = true;
    document.cform.totalpharmacy.disabled = true;
  }
}

function setBusinessarea(id,areaname){
	document.cform.businessareaid.value=id;
	document.cform.areaname.value=areaname;
	
}

function popBusinessarea(){
	if(popwindow!=null) popwindow.close();
    url = '<%=contextPath %>/zyl/masterdata/erm/BusinessAreaPop.jsp?<%= OvalTools.randomURL() %>';
    attribute = 'height=500, width=250,top=100,left=100,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no';
	popwindow = window.open(url,'newwindow', attribute);
}

function page_showExtendInfo(){
	document.getElementById("extendinfo").style.display="block";
	document.getElementById("hiddenbutton").style.display="block";
	document.getElementById("showbutton").style.display="none";
}
function page_hiddenExtendInfo(){
	document.getElementById("showbutton").style.display="block";
	document.getElementById("hiddenbutton").style.display="none";
	document.getElementById("extendinfo").style.display="none";
}
function page_back(){
	location.href="PharmacySummary.jsp?<%= OvalTools.randomURL() %>&summaryidentify=pharmacy&languagecode=<%=strLanguageCode%>&IsExternal=Y";
	//parent.location.href="PharmacySummary.jsp?<%= OvalTools.randomURL() %>&summaryidentify=distributor&languagecode=<%=strLanguageCode%>&IsExternal="+top.isExternal;
}

function showChaintype(chain){
    document.getElementById("chainHead").style.color=(chain==11)?"red":"black";
    document.getElementById("chainType").style.color=(chain==11)?"red":"black";
    document.cform.parentorgcode.command=(chain==11)?"notnull":"";
    document.cform.type1.command=(chain==11)?"notnull":"";
    document.cform.parentorgcode.disabled = (chain==11)?false:true;
    document.cform.parentorgname.disabled = (chain==11)?false:true;
    document.cform.type1.disabled = (chain==11)?false:true;
    document.getElementById("parentOrg").style.display = (chain==11)?"":"none";
    if(document.cform.parentorgcode.value != document.cform.orgcode.value){
      document.cform.franchiseno.disabled = true;
      document.cform.totalpharmacy.disabled = true;
    }
    if(chain==12){
    	document.cform.parentorgcode.value = "";
    	document.cform.parentorgname.value = "";
    	document.cform.parentorgid.value = " ";
    	document.cform.type1.value = " ";
    	document.cform.franchiseno.value = " ";
    	document.cform.totalpharmacy.value = " ";
    }
} 

function page_checkNullStr(obj){
	var str=obj.value;
	str = ( str || "" ).replace(/^\s+|\s+$/g, "");
	str = ( str || "" ).replace(/^\　+|\　+$/g, "");
	obj.value=str;
}

function getorgpdgroup()
{
	if (document.cform.pharmacyid==null||(document.cform.pharmacyid.value==null)||(document.cform.pharmacyid.value.length <= 0)||(document.cform.pharmacyid.value=="null")){
    	alert("<%=message.getMessageDesc("SAVE_INFO_FIRST")%>");
        return;
    }
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('<%=contextPath%>/masterdata/ogm/ZylOrgpdGroup.jsp?<%= OvalTools.randomURL() %>&displayflag=<%=isView?"view":"edit"%>&languagecode=<%= strLanguageCode %>&datacategory=12&orgid='+document.cform.pharmacyid.value,null, 'height=300, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');

}

function getorgpdgroup1()
{
	if (document.cform.pharmacyid==null||(document.cform.pharmacyid.value==null)||(document.cform.pharmacyid.value.length <= 0)||(document.cform.pharmacyid.value=="null")){
    	alert("<%=message.getMessageDesc("SAVE_INFO_FIRST")%>");
        return;
    }
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('<%=contextPath%>/masterdata/ogm/ZylOrgpdGroup.jsp?<%= OvalTools.randomURL() %>&displayflag=<%=isView?"view":"edit"%>&languagecode=<%= strLanguageCode %>&datacategory=18&orgid='+document.cform.pharmacyid.value,null, 'height=300, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');

}

function page_setOrg4(id,name,code)
{
  document.cform.countyorgid.value = id;
  document.cform.countyorgcode.value = code;  
  document.cform.countyorgname.value = name;
  var remote = window.open("","newwindow");
  if (remote != null)
    remote.close();
}
</script>
</head>
<%
String strDisplayFlag="";
if(request.getParameter("displayflag")!=null)
{
  strDisplayFlag=request.getParameter("displayflag");
}
%>
<%
	boolean codereadonly = false;
	boolean datelastupdatedonly = false;
	HashMap pharmacydetail = (HashMap)pageContext.getAttribute("pharmacydetail");
	if(pharmacydetail == null)pharmacydetail = new HashMap();
	String orgcode = null;
	if(pageContext.getAttribute("pharmacydetail") != null ){
		codereadonly = true;
		datelastupdatedonly = true;
		orgcode = (String)pharmacydetail.get("orgcode");
	}
	Integer chain = (Integer)pharmacydetail.get("pharmacytype");
	if(chain==null)chain = new Integer(-1);
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="showChaintype(<%= chain%>);">
<iframe id="reloadHandler" name="reloadHandler" style="display:none"></iframe>
<table width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td class="summary_top"></td>
  </tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0" >
<form  id="pharmacy_cform" name="cform" method="post" action="<%=contextPath %>/Dispatcher" target="_self">
<input type="hidden" name="pagename" value="p_pharmacydetail">
<custom:hidden property="detailactionname" changedName="actionname"/>
<custom:hidden property="detailactionname"/>
<custom:hidden property="istarget" value="2"/>
<custom:hidden property="pharmacyid" name="pharmacydetail"/>
<custom:hidden property="infoid" name="pharmacydetail"/>
<custom:hidden property="pharmacycode" name="pharmacydetail"/>

<%
String s1=label.getLabelName("L_BaseInfo") + label.getLabelName("L_Colon") ;
%>

  <tr> 
    <td valign="top"> 
        <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
          <%if(!(strDisplayFlag).equals("view")){%>
		  <tr>
			 <td colspan="4" class="td_right"><a onclick="page_save()"><custom:button
			  type="2" label="L_Save" imgsrc="save_btn.gif" border="0" /></a></td>
		  </tr>
		  <%}%>
          <tr>
            <td class="td-text" width="20%"><%= label.getLabelName("L_PharmacyCode") + label.getLabelName("L_Colon") %></td>
            <td width="30%">
			<custom:text property="orgcode" name="pharmacydetail" readonly="true" style="border:0;width:100%"  size="20" />
			<td class="td-text" width="20%"><%= label.getLabelName("L_YiLingCode") + label.getLabelName("L_Colon") %></td>
            <td width="30%"><custom:write property="referenceorgcode" name="pharmacydetail" nbsp="true"/></td>
			</td>
          </tr>
          <tr>
            <td class="need"><%= label.getLabelName("L_PharmacyName") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="pharmacyname" name="pharmacydetail" command="notnull" label="L_PharmacyName" onchange="page_checkNullStr(this)"/></td>
         
            <td class="td-text"><%=label.getLabelName("L_PharmacyShortName") +label.getLabelName("L_Colon") %></td>
            <td><custom:text property="shortname" name="pharmacydetail" label="L_PharmacyShortName" onchange="page_checkNullStr(this)"/></td>
          </tr>
          <tr>
            <td class="td-text"><%= label.getLabelName("L_CountyArea") + label.getLabelName("L_Customer") + label.getLabelName("L_Colon") %></td>
            <td>
			  <% if(!isView){%>
			    <custom:text property="countyorgcode" name="pharmacydetail" readonly="true" size="10"></custom:text>
                <a onclick="popup('<%=contextPath %>/masterdata/ogm/CountyOrgSelect.jsp?<%= OvalTools.randomURL() %>&globalpccode=116&flag=pchannel','newwindow','height=250, width=600,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no')"><custom:button  type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
			    <custom:text property="countyorgname" name="pharmacydetail" readonly="true" size="10"></custom:text>
			  <% }else{ %>
			    <custom:text property="countyorgcode" name="pharmacydetail" size="10"></custom:text>
			    <custom:text property="countyorgname" name="pharmacydetail" size="10"></custom:text>
			  <%}%>
              <custom:hidden property="countyorgid" name="pharmacydetail"/>
			</td>
            <td class="td-text" id="chainHead"><%= label.getLabelName("L_ChainHeadquarter") + label.getLabelName("L_Colon") %></td>
            <td>
			 <% if(!isView){%>
            	<custom:text property="parentorgcode" name="pharmacydetail" label="L_ChainHeadquarter" readonly="true" size="10"></custom:text>
            	<a id="parentOrg" onclick="popup('<%=contextPath %>/masterdata/ogm/OrgSelect.jsp?<%= OvalTools.randomURL() %>&globalpccode=112&ischain=1','newwindow','height=250, width=600,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no')"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<custom:text  property="parentorgname" name="pharmacydetail" readonly="true" size="20"></custom:text>
             <% }else{ %>
				<custom:write name="pharmacydetail" property="parentorgcode" nbsp="true"/>
				<custom:write name="pharmacydetail" property="parentorgname" nbsp="true"/>
			 <%}%>
            </td>
            <custom:hidden property="parentorgid" name="pharmacydetail"></custom:hidden>
          </tr>
          
          <tr>
          	<td class="need"><%= label.getLabelName("L_TerminalType") + label.getLabelName("L_Colon") %></td>
            <td><custom:selectdic dictType="PharmacyType" property="pharmacytype" name="pharmacydetail" defaultValue="------" defaultValueCost=" " command="notnull" label="L_TerminalType" valueCriteria="11,12"  onchange="showChaintype(this.value)"/></td>
            <td class="td-text" id="chainType"><%= label.getLabelName("L_PharmacyType") + label.getLabelName("L_Colon") %></td>
          	<td>
          	  <custom:selectdic property="type1" name="pharmacydetail" dictType="ChainType" label="L_PharmacyType" defaultValue="-----" defaultValueCost=" "></custom:selectdic>
            </td>
          </tr>
          
          <tr>
          	<td class="td-text"><%= label.getLabelName("L_Franchiseno") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text property="franchiseno" name="pharmacydetail" size="20" dataType="integer" command="notnegative" label="L_Franchiseno" /></td>
			<td class="td-text"><%= label.getLabelName("L_Totalpharmacy") + label.getLabelName("L_Colon") %></td>
			<td><custom:text property="totalpharmacy" name="pharmacydetail" dataType="integer" size="20" command="notnegative" label="L_Totalpharmacy" /></td>
          </tr>
          <tr>
            <td class="need"><%= label.getLabelName("L_PCCodeName") + label.getLabelName("L_Colon") %></td>
            <td> <custom:selectdic dictType="GlobalPCCode" property="globalpccode" name="pharmacydetail"  valueCriteria="114" command="notnull" label="L_PCCodeName" disabled="true" ></custom:selectdic>  </td>
            <td class="need"><%= label.getLabelName("L_country") + label.getLabelName("L_Colon") %></td>
            <td>
            <%
            	Vector countries = (Vector)pageContext.getAttribute("allcountry");
            	System.out.println(countries);
            %>
            	<custom:select optionInnerTextKey="countryname" optionsName="allcountry" property="countrycode" optionValueKey="countrycode" name="pharmacydetail"/> 
            </td>
          </tr>
          <tr>
          	<td class="need"><%= label.getLabelName("L_DrugstoreLevel") + label.getLabelName("L_Colon") %></td>
            <td>
              <%if(!isView){ %>
                <!--  <custom:button type="3" label="L_Ln" value="*" border="0" onclick="getorgpdgroup()"/>-->
              <%}else{ %>
                <!--  <a onclick="getorgpdgroup()" style="text-decoration: none;font-size: 12px;border:1px #FCAD20 solid;background:#ECE9D8;">*</a>-->
              <%} %>
              <custom:selectdic dictType="PharmacyLevel" property="level1" name="pharmacydetail" valueCriteria="1,2,3"  defaultValue="------" defaultValueCost=" " command="notnull" label="L_DrugstoreLevel"></custom:selectdic>
            </td>
           	<td class="need"><%= label.getLabelName("L_Province") + label.getLabelName("L_Colon") %></td>
            <td>
            <%if(!isView){ %>
              <custom:text property="regioncode" name="pharmacydetail" command="notnull" label="L_Province" size="10" readonly="true"/>
              <a onclick="javascript:page_selectProvince();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
              <custom:text property="regionname" name="pharmacydetail" readonly="true" size="20"/>
            <%}else{ %>
            <custom:write  property="regioncode" name="pharmacydetail" nbsp="true"></custom:write>
            <custom:write  property="regionname" name="pharmacydetail" nbsp="true"></custom:write>
            <%} %>            
          </tr>
          
          <tr>
            <td class="need"><%= label.getLabelName("L_SalesLevel") + label.getLabelName("L_Colon") %></td>
            <td>
              <%if(!isView){ %>
                <custom:button type="3" label="L_Ln" value="*" border="0" onclick="getorgpdgroup1()"/>
              <%}else{ %>
                <a onclick="getorgpdgroup1()" style="text-decoration: none;font-size: 12px;border:1px #FCAD20 solid;background:#ECE9D8;">*</a>
              <%} %>
            </td>
            <td class="need"><%= label.getLabelName("L_City") + label.getLabelName("L_Colon") %></td>
          	<td>
          	 <%if(!isView){ %>
          		<custom:text property="citycode" name="pharmacydetail" command="notnull" label="L_City" size="10" readonly="true"/>
            	<a onclick="javascript:page_selectCity('city',1);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<custom:text property="cityname" name="pharmacydetail" readonly="true" size="20"/>
            <%}else{ %>
            <custom:write  property="citycode" name="pharmacydetail" nbsp="true"></custom:write>
            <custom:write  property="cityname" name="pharmacydetail" nbsp="true"></custom:write>
            <%} %>
            </td>            
          </tr>
          
          <tr>
            <td class="need"><%= label.getLabelName("L_Manager1") + label.getLabelName("L_Colon") %></td>
            <td>
           	  <custom:text property="manager" name="pharmacydetail" label="L_Manager1" size="20" onchange="page_checkNullStr(this)" command="notnull"/>
            </td>
            <td class="need"><%= label.getLabelName("L_YLCounty") + label.getLabelName("L_Colon") %></td>
            <td>
            <%if(!isView){ %>
              <custom:text property="countycode" name="pharmacydetail" size="10" readonly="true" label="L_YLCounty" command="notnull"/>
              <a onclick="javascript:page_selectCity('county',2);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
              <custom:text property="countyname" name="pharmacydetail" readonly="true" size="20"/>
            <%}else{ %>
              <custom:write  property="countycode" name="pharmacydetail" nbsp="true"></custom:write>
              <custom:write  property="countyname" name="pharmacydetail" nbsp="true"></custom:write>
            <%} %>
            </td>          	
          </tr>
             <tr>
              <td class="td-text"><%= label.getLabelName("L_TurnOver") + label.getLabelName("L_Colon") %></td>
            <td>
            	<custom:text property="turnover" name="pharmacydetail" dataType="double" command="notnegative" label="L_TurnOver" size="20" dataType="double"/><%=label.getLabelName("L_Megabucks") %>
            </td>
             
          	<td class="td-text"><%= label.getLabelName("L_YLsaleroom") + label.getLabelName("L_Colon") %></td>
          	<td>
          		<custom:text property="ylsaleroom" name="pharmacydetail" size="20" dataType="double" command="notnegative" label="L_YLsaleroom" dataType="double"/><%=label.getLabelName("L_Megabucks") %>
            </td>
            	
          </tr>
            <tr>
            <td class="need"><%= label.getLabelName("L_Bizarea") + label.getLabelName("L_Colon") %></td>
            <td>
            	<custom:text property="bizarea"  name="pharmacydetail" dataType="double" command="notnull,notnegative" label="L_Bizarea" size="20"/><%=label.getLabelName("L_SquareMeter") %>
            </td>
            
          	<td class="td-text"><%= label.getLabelName("L_TurnoverTime") + label.getLabelName("L_Colon") %></td>
          	<td>
          	
            <!--  
              <custom:text name="pharmacydetail" property="datelastupdated" size="20" label="L_TurnoverTime" />
             <a onclick="javascript:show_calendar('cform.datelastupdated','yyyy-MM-dd');"><input type=button class="button3" value="*"></a> 
            -->
           <custom:text property="datelastupdated" dataType="date" name="pharmacydetail" dataFormatName="dateformat" size="20"  label="L_TurnoverTime" onfocus="c.show(this,'cform.datelastupdated','yyyy-MM-dd')" />
            
            </td>
	
           
          </tr>
          <tr>
            <td class="td-text"><%= label.getLabelName("L_IsProtocol") + label.getLabelName("L_Colon") %></td>
          	<td>
          	  <custom:selectdic dictType="YesOrNo" name="pharmacydetail" property="isprotocol" defaultValue="------" defaultValueCost=" "  />
            </td>
            <td class="td-text"><%= label.getLabelName("L_AgreementType") + label.getLabelName("L_Colon") %></td>
          	<td>
          	  <custom:selectdic dictType="ProtocolsType" name="pharmacydetail" property="protocolstype" label="L_AgreementType" defaultValue="------" defaultValueCost=" " sortOrder="desc" />
            </td>
          </tr>
          <tr>
            <td class="td-text"><%= label.getLabelName("L_IsParity") + label.getLabelName("L_Colon") %></td>
            <td><custom:selectdic dictType="YesOrNo" property="isparity" name="pharmacydetail"  defaultValue="------" defaultValueCost=" "></custom:selectdic></td>
          	<td class="td-text"><%= label.getLabelName("L_IsBaseMedicineTerminal") + label.getLabelName("L_Colon") %></td>
          	<td colspan="3"><custom:selectdic dictType="YesOrNo" defaultValue="---" defaultValueCost=" " name="pharmacydetail"  property="isbasemedicineterminal" /></td>
          </tr>
          <tr>
            <td class="td-text"><%= label.getLabelName("L_Filedate") + label.getLabelName("L_Colon") %></td>
          	<td>
              &nbsp;<custom:write property="filedate" name="pharmacydetail" />
         	</td>
          	<td class="td-text"><%= label.getLabelName("L_Telephone") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text property="telephone" name="pharmacydetail" label="L_Telephone"/></td>
          </tr>
          <tr>
            <td class="need"><%= label.getLabelName("L_Status") + label.getLabelName("L_Colon") %></td>
            <td><custom:select optionsName="allstatus" optionValueKey="statuscode"  optionInnerTextKey="statusname" name="pharmacydetail" property="status" command="notnull" label="L_Status"/></td>
          	<td class="td-text"><%= label.getLabelName("L_AddressLine1") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text property="registeraddress" name="pharmacydetail" label="L_ReceiptMan" size="40" label="L_AddressLine1"/></td>
          </tr>
          <tr>
            <td class="need"><%= label.getLabelName("L_MedicalInsurance") + label.getLabelName("L_Colon") %></td>
            <td>
              <custom:selectdic dictType="YesOrNo" property="ismedicalinsurance" name="pharmacydetail" defaultValue="------" defaultValueCost=" " command="notnull" label="L_MedicalInsurance"></custom:selectdic>
            </td>
            <td class="td-text"><%= label.getLabelName("L_URL") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="url" name="pharmacydetail"/></td>
          </tr>
          <tr>
            <td class="td-text"><%= label.getLabelName("L_ZipCode1") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="zipcode" name="pharmacydetail" command="notnegative" label="L_ZipCode1"/></td>
          	<td class="td-text"><%= label.getLabelName("L_Email") + label.getLabelName("L_Colon") %></td>
            <td><custom:text property="email" name="pharmacydetail"/></td>
          </tr>
           <tr> 
              <!--<td class="td-text"><%= label.getLabelName("L_Accountcondition") + label.getLabelName("L_Colon") %></td>
            <td> 
            <custom:selectdic dictType="AccountconditionType" property="accountcondition" name="pharmacydetail" defaultValue="-----" defaultValueCost=" " label="L_Accountcondition"/>
         	</td>-->
         	<td class="td-text"><%= label.getLabelName("L_Newrecordname") + label.getLabelName("L_Colon") %></td>
          	<td><custom:text property="newrecordname" name="pharmacydetail" size="40" label="L_Newrecordname"></custom:text>
          	</td>
            <td class="td-text"><%= label.getLabelName("L_Comments") + label.getLabelName("L_Colon") %></td>
            <td> 
               <custom:text name="pharmacydetail" property="comments" size="40"/>
            </td>
          </tr>
         <!-- <tr> 
            <td class="need"><%= label.getLabelName("L_BusinessAreaName") + label.getLabelName("L_Colon") %></td>
            <td>
				<custom:hidden name="pharmacydetail" property="businessareaid"/>
				<%if(!isView){%>
				<custom:text name="pharmacydetail" property="areaname" command="notnull" label="L_BusinessAreaName" readonly="true"/>
				<%}else{%>
				<custom:write name="pharmacydetail" property="areaname" nbsp="true"/>
				<%}%>
				<a onclick="popBusinessarea()"><custom:button type="3" value="*"/></a>
            </td>
            
          </tr>-->
          <!-- 
          <tr> 
            <td class="td-text"><%= label.getLabelName("L_Comments") + label.getLabelName("L_Colon") %></td>
            <td colspan="3"> 
               <custom:text name="pharmacydetail" property="comments" size="100"/>
            </td>
          </tr>
           -->
        </table>
      </td>
  </tr>
  </table>
   <div id="showbutton" style="display:block">
		  <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
			  <tr>
				<td height="49" class="td_right">
					<a onclick="page_showExtendInfo()"><input type=button class="button2" value="<%=label.getLabelName("L_ShowInformation") %>" style="width:100"></a>
				</td>
			  </tr>
		  </table>
	</div>
	<div id="hiddenbutton" style="display:none">
		  <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
			  <tr>
				<td height="49" class="td_right">
					<a onclick="page_hiddenExtendInfo()"><input type="button"  class="button2"  value="<%=label.getLabelName("L_HideInformation") %>"  style="width:100"></a>
				</td>
			  </tr>
		  </table>
	</div>
		  
    <div id="extendinfo" style="display:none;clear:both;" >
				
	 <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
          <tr> 
            <td colspan="4" class="deepblue-left"><img src="../../../images/cn/quote.gif"> 
             <%=label.getLabelName("L_OrgRegistrationInfo") %></td>
          </tr>
          <tr> 
            <td class="td-text" width="20%"> <%=label.getLabelName("L_OrgOpenDate") +label.getLabelName("L_Colon") %></td>
            <td >  
            
             <%if(!isView){ %>
           <custom:text property="opendate" name="pharmacydetail" dataType="date" dataFormatName="dateformat" size="20" readonly="true" onfocus="c.show(this,'cform.opendate','yyyy-MM-dd')"/>
           <%}else{ %>
           <custom:write property="opendate" name="pharmacydetail" nbsp="true"></custom:write>
           <%} %>
            </td>
            <td class="td-text" width="20%"><%=label.getLabelName("L_CorporatePerson") +label.getLabelName("L_Colon") %></td>
            <td > 
            <custom:text property="corporateperson" name="pharmacydetail" size="20" ></custom:text>
            </td>
          </tr>
         <tr> 
            <td class="td-text" width="20%"><%=label.getLabelName("L_CorpTypeName") +label.getLabelName("L_Colon") %></td>
            <td width="30%" > 
            <custom:selectdic dictType="CorporationType" name="pharmacydetail" property="corporationtype" defaultValue="-----" defaultValueCost=" "></custom:selectdic>
            </td>
            <td class="td-text" width="20%"><%=label.getLabelName("L_Registerfund") +label.getLabelName("L_Colon") %></td>
            <td > 
            	<% String af = (String)session.getAttribute("amountformat"); %>
            <custom:text  property="registerfund" name="pharmacydetail" size="20" label="L_Registerfund"  dataType="double" command="notnegative" dataFormat="<%=af %>"></custom:text>
            </td>
          </tr>
          <tr> 
            <td class="td-text" width="20%"><%=label.getLabelName("L_LicenseNumber") +label.getLabelName("L_Colon") %></td>
            <td > 
            <custom:text  property="licenceno" name="pharmacydetail" size="20" label="L_LicenseNumber"> </custom:text>
            </td>
            <td class="td-text" width="20%"><%=label.getLabelName("L_BankName") +label.getLabelName("L_Colon") %></td>
            <td > 
                 <custom:text  property="accountbank" name="pharmacydetail" size="20" label="L_BankName"> </custom:text>
            </td>
          </tr>  
          <tr> 
            <td class="td-text" width="20%"><%=label.getLabelName("L_BankAccount") +label.getLabelName("L_Colon") %></td>
            <td > 
              <custom:text  property="accountno" name="pharmacydetail" size="20" label="L_BankAccount"> </custom:text>
            </td>
            <td class="td-text" width="20%"><%=label.getLabelName("L_VATRegistrationNumber") +label.getLabelName("L_Colon") %></td>
            <td > 
             <custom:text property="taxno" name="pharmacydetail" size="20" label="L_VATRegistrationNumber"> </custom:text>
            </td>
          </tr>  
          <tr> 
            <td class="td-text" width="20%"><%=label.getLabelName("L_RegisteredAddress") +label.getLabelName("L_Colon") %></td>
            <td colspan="3"> 
             <custom:text property="address" name="pharmacydetail" size="100" label="L_RegisteredAddress"> </custom:text>
            </td>
          </tr>
  <tr>
    <td class="summary_top"></td>
  </tr>
  </table></div>
   
				
		  <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
 <!--  
  <tr> 
      <td height="49" class="td_center">
      	<a onclick="page_done()"><input type=button class="button1" value="<%=label.getLabelName("L_Finish") %>" style="width:60"></a>
      	<a onclick="page_back()"><input type=button class="button1" value="<%=label.getLabelName("L_Back") %>" style="width:60"></a>
      </td>
  </tr>
  -->
  </table>
</form>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td class="td_center">
		<a onclick="__back()"><custom:button type="2" label="L_Back" imgsrc="delete.gif" border="0" style="width:60"/></a>
		</td>
	</tr>
</table>
</body>
<script>
  var list=document.getElementsByTagName("input");
  m=list.length
  list[m-1].style.display='none';
</script>
</html>